home *** CD-ROM | disk | FTP | other *** search
- • PipeDream − For those who have not used View etc and who have
- therefore not had to fight printer drivers, the following may be useful:
- 1.12
- The printer driver is loaded on initialisation and when <Alt><P><D> is
- used, but NOT when a document is printed, so any changes made to a
- printer driver are not acted upon until either of these events. It’s
- obvious really, but if you haven’t registered the fact, it could cause a
- lot of confusion.
- 1.12
- For those who wish to use bold throughout a document, (e.g. for
- producing something on a dot-matrix printer that will go through a Fax
- machine) it would seem an obvious solution to put markers at the
- beginning and end of the document and make it all bold highlight.
- However, this is not a good idea because your printer will have to cope
- with double printing each word, one word at a time! Instead, change the
- printer driver so that the bold highlight is NOT cancelled at the end of
- a line. i.e. change the Y to an N and either send the necessary ESC
- sequence in the PON line or put a highlight 2 at the very start of your
- text.
- 1.12
- • Transferring character definitions − If you have files produced by
- the CHARDES program from the Master Welcome disc (mentioned last month,
- page 34) here is a little BASIC program to run the files on the
- Archimedes:
- 1.12
- 10 REM >ThinChar
- 1.12
- 20 CLS : INPUT “FileName ”;A$
- 1.12
- 30 OSCLI (“LOAD ”+A$+“ 12800”)
- 1.12
- 40 FOR I=127 TO 32 STEP -1
- 1.12
- 50 VDU23,I
- 1.12
- 60 VDU(?(&12844+I-32))
- 1.12
- 70 VDU(?(&128A4+I-32))
- 1.12
- 80 VDU(?(&12904+I-32))
- 1.12
- 90 VDU(?(&12964+I-32))
- 1.12
- 100 VDU(?(&129C4+I-32))
- 1.12
- 110 VDU(?(&12A24+I-32))
- 1.12
- 120 VDU(?(&12A84+I-32))
- 1.12
- 130 VDU(?(&12AE4+I-32))
- 1.12
- 140 NEXT
- 1.12
- • Quazer (again). The fix for Quazer 1.42 is ?&3D090=N¼ of lives,
- ?&3D98F=&F2, *SAVE Quazcode 9000 +365AC, *settype Quazcode FF8. •
- Printing in binary − PRINT ~number% prints number% in hexadecimal but
- there isn’t an equivalent for printing in binary. However, there are SYS
- commands that will do it for you. The following program illustrates the
- use of SYS &E0 which converts a number to a four byte binary number
- string (SYS’s &DF, DE and DD convert to 3, 2 and 1 byte binary numbers).
- 1.12
- The only other point of interest in the program is the way that the
- leading zeros are stripped off by lines 190, 200 (which can be omitted,
- of course, if you want the leading zeros!). The INSTR command finds the
- position of the first “1” starting from the left hand end of the string,
- take off one to give the number of zeros to be removed. The LEFT$
- command at line 200 turns those zero characters into the character set
- by pad$. (This illustrates the fact that you can use string functions on
- the left hand side of an assignment.) If pad$ is a space character, the
- binary numbers produced will all be the same length and so will be right
- justified but if you want the strings left justified, you can set pad$
- to CHR$0. (An alternative for left justification would be to use
- numb$=RIGHT$(numb$,32-n%).)
- 1.12
- 10 REM > BinPrint
- 1.12
- 20
- 1.12
- 30 pad$=CHR$0 :REM left justif’n
- 1.12
- 40 pad$=“ ” : REM right justif’n
- 1.12
- 50 OS_ConvertBinary4=&E0
- 1.12
- 60
- 1.12
- 70 REPEAT
- 1.12
- 80 INPUT “Number? ”number$
- 1.12
- 90 number%=EVAL(number$)
- 1.12
- 100 A$=FNbinconvert(number%)
- 1.12
- 110 PRINT A$
- 1.12
- 120 UNTIL0
- 1.12
- 130
- 1.12
- 140 DEF FNbinconvert(numb%)
- 1.12
- 150 LOCAL numb$,n%
- 1.12
- 160
- 1.12
- 170 SYS OS_ConvertBinary4,numb%,
- 1.12
- 32,numb$ TO numb$
- 1.12
- 180
- 1.12
- 190 n%=INSTR(numb$,“1”)-1
- 1.12
- 200 LEFT$(numb$,n%)=STRING$(n%
- 1.12
- ,pad$)
- 1.12
- 210 =numb$
- 1.12
- • Hard Disc Head Parking − Don’t forget that if the RFS is selected,
- it will accept the *BYE command but it will not park the heads on the
- drive. You have to be in ADFS.
- 1.12
- • Screenload/save − It is interesting to compare the time taken to
- save and load screens using *screensave and *screenload with the time
- taken to define the whole screen as a sprite and save it using *Ssave or
- load it with *Sload. In all modes there is considerable saving e.g.
- 1.12
- Mode1 Mode12 Mode 15
- 1.12
- *Screensave(load) 7(4) 25(18) 52(38)
- 1.12
- *Ssave(load) 1(<1) 3(3) 7(6)
- 1.12
- • Libraries and *mountÉ If you *mount a disc, the library from the
- previous disc remains in memory. For those with a single drive, this may
- seem a nuisance but the reason the library is not changed is that you
- can have a library on one drive and shove discs in and out of the other
- drive without losing the library − particularly important with hard
- discs. Obviously you could reselect the library with *library $.Library
- but it is much easier to use *bye. That way, you don’t even have to use
- *mount.
- 1.12
- • Reliable RS423 transfer from BBC’s. This is mostly just reiterating
- what has gone before, but to transfer reliably from BBC to Archimedes at
- 9,600 baud you need to [1] use the 1.24 serial patch (on Archive program
- disc 7) [2] Set *Configure DATA 5 (i.e. 8 data bits and 1 stop bit which
- is the default on the BBC) and [3] connect the BBC’s RTS output to the
- Archimedes’ DSR input (pin 6) instead of the CTS input (pin 8) and link
- pins 1, 4 and 8 together.
- 1.12
- • View A3.0 Further to the patches given in July issue (Vol. 1.10 page
- 6) Richard House reckons that instead of using &FF’s in the various
- locations you should use &00’s. (If someone has a working version of
- A3.0, please send it in so that we can add it to our collection of
- working patches!)
- 1.12
- • Viewstore 1.1 − Following on from the July Hints & Tips, not that
- not only should &ABE2, 3 and 4 be set to &EA, but also, the LDA #&82,
- JSR OSBYTE (&A9, &82, &20, &F4, &FF) routines need to be altered as with
- View A3.0. These occur at locations &A256 − A25A, &AA22 − AA26 and &AB98
- − AB9C. The code required in each of these locations is &A2, &00, &A0,
- &00, &EA. (LDX #&00, LDY #&00, NOP). (If you can’t cope with these
- technicalities, send us a disc with Viewstore 1.1 on it and we’ll modify
- it for you.)
- 1.12
- • Correct Nesting? To check that the nesting of loops, IF’s and CASE’s
- is correct within a program, use LISTO2 and LIST the program. If at the
- end of the program, the final line has two or more spaces after the line
- number, you’ve got an incorrect nesting somewhere. To check through,
- there should be no spaces between line numbers and DEFPROC’s, DEFFN’s or
- ENDPROC’s.
- 1.12
- • Marconi Trackerball. Archimedes’ mouse’s tail can apparently be
- removed, so says Mr T A Doncaster, and plugged into an identical
- connector within the Marconi RB2/PC-1 tracker ball and all works without
- any further fiddling about. Watch that the supply polarity is correct
- though.
- 1.12
- • Readable zeros. In InterSheet in particular, I find the slashed-
- zeros misleading − they can easily be mistaken for eights. If you re-
- program the zero character using a VDU23 command you can avoid the
- confusion. It does increase the possibility of confusion with a capital-
- O but that is far less important in spreadsheet work than confusion with
- 8. So, I store the following program in the RAM on the RFS and call it
- up with *IS<return>:
- 1.12
- 10 REM >RFS:IS
- 1.12
- 20 VDU23,48,60,102,102,102,102,
- 1.12
- 102,60,0
- 1.12
- 30 CHAIN “RFS:ISHEET”
- 1.12
- No doubt you could modify this program if you wanted to use the same re-
- programmed zero character with other spreadsheet software.
- 1.12
- • Computer salutions. R.E.Boldero, in the July edition, asked for a
- way of getting his computer to greet him each time he switched on. The
- next hint shows a partial solution.
- 1.12
- • RFS Boot file − If you use a ROM podule with battery backup, you can
- create a boot file that runs in the RFS and sets up all sorts of
- goodies. I used to have a BASIC program called !BOOT which set up all
- sorts of things on power-up or <ctrl-break> but if you are developing a
- BASIC program, get stuck and press <ctrl-break>, you lose the program
- because it is replaced by the boot program!!!!! After Adrian had fallen
- into this trap a few times when using my computer, he developed the
- following rather ingenious (not to say devious) EXECable boot program.
- (*Configure Filesystem RFS, *Configure Boot and *OPT 4,3 in the RFS.)
- 1.12
- We have since added a facility for making Arthur talk to you a bit more
- politely, from an idea sent in by Chris Hayes.
- 1.12
- To create the boot file, I start with the following Wordwise Plus file
- which is then spooled as “RFS:!BOOT”. (The line numbers are purely for
- discussion purposes.)
- 1.12
- 1 <gr>LL160<gr>PC “~”
- 1.12
- 2 VDU21
- 1.12
- 3 VDU6,11,32,32,32,32,32,32,21
- 1.12
- 4 VDU6,19,0,4,0,0,0,21
- 1.12
- 5 VDU6,19,1,0,0,0,0,21
- 1.12
- 6 VDU6,13,11,11,11,11,11,21
- 1.12
- 7 VDU6:COLOUR 6:VDU21
- 1.12
- 8 VDU6:PRINT“N o r w i c h C o
- 1.12
- m p u t e r S e r v i c e s“
- 1.12
- :VDU21
- 1.12
- 9 VDU6:COLOUR 7:VDU21
- 1.12
-
- 1.12
- 10 *SETCLI$PROMPT <13><10>Good
- 1.12
- Morning! *
- 1.12
- 11 *IF SYS$TIME LEFT 2>11 THEN SET
- 1.12
- CLI$PROMPT <13><10>Good Afternoon! *
- 1.12
- 12 *IF SYS$TIME LEFT 2>18 THEN SET
- 1.12
- CLI$PROMPT <13><10>Good
- 1.12
- Evening! *
- 1.12
-
- 1.12
- 13 *KEY0 *MOUNT 0|M*FREE|M*CAT|M
- 1.12
- 14 *KEY1 etc...
- 1.12
- 20 *KEY12 *FORMAT 0 D|M
- 1.12
-
- 1.12
- 21 *SET Run$Path ,ADFS:$.,RFS:$.
- 1.12
- ,%.
- 1.12
- 22 *SET Alias$> CAT
- 1.12
-
- 1.12
- 23 *FX255,8
- 1.12
- 24 *ADFS
- 1.12
- 25 *BASIC<gr>OC6
- 1.12
- The LL160 command (1) ensures that the command lines are not split up
- and the PC command ensures that the pad characters are sent when
- spooling the file. (2) switches off the screen display, but since this
- actual command appears on the screen, (3) moves up and wipes it out
- again! (4) and (5) change foreground and background colours (6) moves
- the cursor back up the screen, before printing out a welcome message in
- a different colour, (7 & 8) and switching back to white (9). The IF
- SYS$TIME commands then sets up the Arthurian prompt (normally a star on
- its own) to be something a bit more timely. (This doesn’t automatically
- change the greeting as the time of day changes, it gives you the
- greeting that was appropriate last time you pressed <ctrl-break>.) The
- function keys are then programmed, the runpath is set up etc (21 − 24)
- (See Archive 1.7, page 8) before BASIC is invoked with an OC6 to re-
- enable the screen.
- 1.12
- (You could create it by making it a BASIC program that started...
- 1.12
- *SPOOL RFS:!BOOT
- 1.12
- PRINT“VDU21”
- 1.12
- and endedÉ
- 1.12
- PRINT“*BASIC”;CHR$(6);
- 1.12
- *SPOOL
- 1.12
- I haven’t tried this BASIC version, but I presume it would work.)
- 1.12
- • Keyboard repeat speed. You may have noticed with First Word Plus or
- other wordprocessors that when pressing <return> on auto-repeat it
- cannot keep up and, when you take your finger off the key, it goes on
- spewing out returns until the keyboard buffer is empty. You can avoid
- this by reducing the auto-repeat speed with, say, *Configure repeat 15
- (instead of the default of 8) and then pressing <ctrl-break>. (It should
- really be called the auto repeat time as the number is the time in
- centi-seconds between repeats.) Instead of changing the configuration,
- you may prefer to could add a *FX12,15 command into the !BOOT file and
- then press <ctrl-break> after your WP session to restore the default
- repeat speed.
- 1.12
- • Disappearing cursor in EDIT. Have you noticed that if you hold the
- cursor key down in the BASIC editor, the cursor disappears so that you
- can’t see where it is on the line? Try changing the auto repeat speed as
- mentioned in the hint above − doesn’t always work, but it seems to make
- it better if you have a faster speed (smaller number in the command).
- 1.12
- • Auto indenting in EDIT. Some people like to put the indenting into
- the program itself to show the structure (as opposed to using LISTO3 to
- show the structure when you list it). If you are using the ARM BASIC
- editor, you can add the spaces automatically as you type in the program.
- What happens is that if you put a number of spaces at the beginning of
- one program line then, when you press <return>, the new line has the
- same number of leading spaces as the line before, so until you reach a
- REPEAT or UNTIL or FOR or NEXT etc, you just press <return> and type the
- next line without thinking about the indenting.
- 1.12
- • Disappearing programs in EDIT!! On the BASIC editor, if you edit a
- line that occupies more than one screen line and make it shorter, it may
- leave a blank line on the screen (no problem − this disappears as soon
- as you move the cursor away from that line). If you then press <return>
- to create a new line, the new line goes in the gap left by the editing
- (still, apparently, no problem). However as soon as you try to use any
- of the move, delete, or copy functions, all the line numbers go wrong
- and cursor movement becomes rather unpredictable. Indeed, if you move
- down the program, you will find that when the line that was edited moves
- off the top of the screen, the scrolling continues and the program
- disappears into oblivion! (Reset and OLD will recover your program
- intact.)
- 1.12
- The solution is, if you get a line gap, either re-number (which happens
- automatically if the line numbers were already consecutive) or move down
- a line then back up again before pressing <return>.
- 1.12
- • Pencil for Artisan. If you want to add a ‘pencil’ facility to
- Artisan, the joined-lines function can be made to provide this in the
- following way. (1) Using a copy (not the original!!) of the Artisan
- disc, enter the BASIC editor and load ART5. (2) Use Search and Edit to
- find DEFPROCKB. (3) Alter the procedure so that it looks like this:-
- 1.12
- DEFPROCKB
- 1.12
- LOCAL X%, Y%, B%
- 1.12
- IF J%=6 AND CLARE%=-1 THEN
- 1.12
- MOUSE X%,Y%,B% :ENDPROC
- 1.12
- ELSE
- 1.12
- REPEAT:MOUSE X%,Y%,B%:UNTIL B%<>BB%:ENDPROC
- 1.12
- ENDIF
- 1.12
- (4) Save this as ART5. (5) For completeness, use the Welcome utility,
- SEDIT, to change the joined-lines icon into a pencil icon. (6) Now, with
- the joined-lines function selected, holding down <select> draws a
- continuous line. On releasing <select>, the normal rubber band line
- appears, but it can be released by pressing <adjust> once. Pressing
- <adjust> again carries out the UNDO function.
- 1.12
- (While on the subject of modifying Artisan, note the short addition in
- Acorn User, April ’88 which adds an airbrush effect.)
- 1.12
- • Star LC24-10. If you are having problems with getting a Star LC24-10
- to accept output from First Word Plus or Graphic Writer, check the EPROM
- chip in the printer next to the dip switches. If it has a label on it
- showing version 1.0, contact Star Micronics and they will supply a free
- up-grade.
- 1.12
- • Moving menus. If you find that your menus keep moving about, drag
- the box down to the extreme bottom right corner of the screen until you
- can go no further. This makes them a little more secure − simple, but
- soothing!
- 1.12
- • Programming for speed. Programs like EMR’s SoundSynth and Minerva’s
- Hoverbod and Missile Control are actually written in BASIC, with calls
- to ARM assembly language routines where extra speed is really necessary.
- 1.12
- If you thought professional quality programs demanded assembly language
- only, think again! Perhaps there is a program you had thought of
- writing, but did not feel could be written in BASIC; the speed of the
- Archimedes has changed all of that.
- 1.12
- Your strategy should be to write the whole program in BASIC first and
- then see which routines need replacing with assembly language in order
- to provide the right response times.
- 1.12
- Mike Ginns’ recent book from DABS Press, “Archimedes Assembly Language”,
- contains a large number of assembly language counterparts for BASIC
- statements (he calls them “templates”), and would be of great value if
- you want to try your hand at this sort of approach. Although the book
- has rather a large number of grammatical errors and is not quite as
- fully comprehensive as it claims to be, but is still a good buy at
- £14.95. (Ian Nicholls)
- 1.12
- First Word Plus Hints
- 1.12
- • Using PC’s − If you have access to a PC and a PC version of First
- Word Plus, you may be interested to know that you can transfer files
- between the two using the Getfile and Putfile utilities of the PC
- Emulator. You can even transfer supplementary dictionaries the same way.
- 1.12
- • Adding printer drivers − It may not be very obvious how you add the
- extra printer drivers that we’ve provided on the program discs, onto
- your First Word Plus disc. Suppose you want the Kaga Taxan driver. Put
- in the program disc and type
- 1.12
- *copy 1WP.cfg.Kaga_Taxan 1WP.cfg.* P
- 1.12
- then change discs and press <space> as prompted. (Or use dual drives if
- you have them.)
- 1.12
- • Default printer driver − If you want to make, say the Juki driver,
- the default so that it comes up with that as the driver when you boot up
- the disc, use:
- 1.12
- *copy $.1WP.cfg.Juki $.Res*.
- 1.12
- 1WP.1wp_print F
- 1.12
- The F in the copy command makes it over-write the existing default
- driver.
- 1.12
- • Paging problems. You can now get a version of First Word Plus that
- obeys the command in the printer driver to stop at the end of a page to
- allow you to change the paper. Brian Carroll writesÉ “I returned my disc
- to Acorn and had it back by return of post with a clear and helpful
- letter. It seems that Acorn are at last getting the message about
- customer support. There are only two modified files: $.resources.1WP.1WP
- and $.resources.1WP. 1ML, so for anyone who has done some work to
- configure their working master disc it would be simpler just to copy
- these two files across than to start again from scratch. The bug-fix
- works OK, so the printer drivers that I sent for Canon PW-1080A (program
- disc number 10) will work properly.”
- 1.12
- • LQ1050 − You can add double height to the printer driver merely by
- using Search and Replace, changing 57 for 77 (double width for double
- height). It works fine − the only thing to remember is to set the line
- spacing to 2 in the ruler when choosing expanded pitch.
- 1.12
- • Large documents. Beware when you are printing long documents (30
- pages+) as FWP can get a bit confused and print the wrong pages.
-